package com.gemframe.kafka;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

	@Autowired
	private KafkaSender kafkaSender;
	
	@GetMapping("send")
	public ResponseEntity<String> send(){
		String string = UUID.randomUUID().toString();
		kafkaSender.sendMessage(string);
		return ResponseEntity.ok(string);
	}
}
